import Vue from 'vue'
import Router from 'vue-router';
import VueRouter from 'vue-router';


//引用登录1
import login1 from '../pages/Login/login1.vue';

//引用登录2
import login2 from '../pages/Login/login2.vue';

import login from '../pages/Login/login.vue';

//引用登录
import register from '../pages/Login/register.vue'
//引用公共部分
// import topbar from '../common/topbar.vue';
// import headbar from '../common/head.vue';
import home from '../pages/Home/home.vue';
import forget from '../pages/Login/forget'

Vue.use(Router)

export default new Router({
    mode:'history',
    routes:[
        {path:'/home',name:'home',component:home},
        {path:'/login',name:'login',component: login , props:{name:'注册'}},
        {path:'/register',name:'register',component:register},
        {path:'/forget',name:'forget',component:forget},
        {path:'',redirect:"home"},
        {path:'/product',name:'produce',component:resolve=>(require(["@/pages/product/index.vue"],resolve))},
        {path:'/shopCar',name:'shopCar',component:resolve=>(require(["@/pages/ShopCar/index.vue"],resolve))},
       // {path:'*',component:NotFoundComponent}
    ]
})
